Skip to content

removed unnecessary collect to improve the memory utilisation. - #351

Merged
MathNya merged 3 commits into
MathNya:masterfrom
agentjill:master
Jul 28, 2026
Merged

removed unnecessary collect to improve the memory utilisation.#351
MathNya merged 3 commits into
MathNya:masterfrom
agentjill:master

Conversation

@agentjill

Copy link
Copy Markdown
Contributor

hey @MathNya, in this PR i have tried to reduce the memory usage my reducing the collection of iterator into Vec as much as possible and lazily evaluate as many values required. This may slightly reduce the memory that the program uses. Also I have added some changes to internal function signature to be more generic.

@MathNya

MathNya commented Jul 28, 2026

Copy link
Copy Markdown
Owner

@agentjill
Thank you for the PR.
Since there were no issues with the changes, I’ll go ahead and merge them.

@MathNya
MathNya merged commit 4e9fe00 into MathNya:master Jul 28, 2026
1 of 5 checks passed
@agentjill

agentjill commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@MathNya, the tests fail with following error

error: this argument is passed by value, but not consumed in the function body
--> src/structs/chart.rs:335:33
|
335 | area_chart_series_list: Vec<&str>,
| ^^^^^^^^^ help: consider changing the type to: &[&str]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#needless_pass_by_value
= note: -D clippy::needless-pass-by-value implied by -D warnings
= help: to override -D warnings add #[allow(clippy::needless_pass_by_value)]

Here the function in reference new_chart(..) is a pub fn, if changes as asked by clippy are implemented then it would break the API surface. Kindly resolve this either denying the lint for this function or accepting the breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants